package com.iskny.framework.admin.controllor;

import com.jfinal.core.Controller;
import com.jfinal.validate.Validator;

public class UserValidator extends Validator {

	@Override
	protected void validate(Controller c) {
		c.validateToken();
		validateRequired("loginname", "loginname_error", "登录名不能为空");
		validateRequired("password", "password_error", "密码不能为空");
	}

	@Override
	protected void handleError(Controller c) {
		c.keepPara("loginname");
		c.render("login.html");
	}

}
